package com.kk.xhr.model.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Collections;
import java.util.List;

/**
 * pageDto
 *
 * @param <T> 范型类型
 * @author luokexiong
 * @version 1.0 2021/2/13
 * @since 1.0.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class PageDto<T> {
    private long total;
    private List<T> pageList;

    public static <T> PageDto<T> empty() {
        return new PageDto<>(0, Collections.emptyList());
    }
}
